The present invention relates to tools for performing computerized searches of data. In particular, the present invention relates to tools for structuring search queries.
One of the most popular uses for computerized systems is the storage and retrieval of large amounts of data. To retrieve data, especially text based data, users either search through an index of the data to locate the data they desire or submit searching parameters to a computerized searching tool that searches through the data based on the parameters.
To improve the precision of the search results returned by search tools, many search tools accept logical operators that define the relationships between various terms of a search query. These logical operators typically include boolean operators such as AND, OR, and NOT. The logical operators can also include pseudo Boolean operators such as NEAR, WITHIN (often delineated as W/), and parentheses.
When used properly with a search tool that is designed to accept them, such logical operators can improve searching efficiency. Unfortunately, the use of logical operators is not intuitive, and many searchers use them incorrectly. This results in poorly formed logical expressions that can actually diminish the performance of a search tool. For example, if the user places a logical operator next to a preposition such as xe2x80x9ctoxe2x80x9d, a search tool may not find a match for the complete expression because search tools generally do not index prepositions.
An additional problem with using logical operators is that not every search tool expects to receive logical operators in a query. For example, natural language search tools expect search queries to be entered as normal sentences or questions. The insertion of logical operators in an otherwise normal sentence simply impedes the performance of such search tools.
A method is implemented in a computerized system that provides access to a search tool capable of searching at least one stored record. The method includes determining whether a search query is a logical query by comparing each search term to a set of logical operators. If a search term is in the set of logical operators it is removed from the search query to produce a modified search query. The modified search query is then passed to a search engine.
In some embodiments, the method determines that the query is a logical query if logical operators appear as every other word in the search query. In other embodiments, capitalized logical operators indicate that this is a logical search query.